In a switching power supply, a main power switch is usually an N-channel enhancement transistor, and a high voltage starting resistor or other starting resistance is used to supply power for a control unit when starting (e.g., powering up) the circuit. In addition, an auxiliary winding of a transformer or an output terminal may be used to supply power for the control unit after the circuit is in normal operation state after the circuit is actuated.